package com.zzw.listener;

import com.zzw.utils.RedisUtil;
import com.zzw.utils.WebUtils;

import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import javax.servlet.http.HttpServletRequest;

/**
 * @author 赵志伟
 * @version 1.0
 */
@SuppressWarnings({"all"})
public class ZzwServletRequestListener implements ServletRequestListener {

    @Override
    public void requestInitialized(ServletRequestEvent sre) {
        HttpServletRequest servletRequest = (HttpServletRequest) sre.getServletRequest();
        WebUtils.servletRequest.set(servletRequest);
    }

    @Override
    public void requestDestroyed(ServletRequestEvent sre) {

    }
}
